#include <iostream>
#include <string>

using namespace std;

void printMatrix(int size, string space) {
	
	cout << "[" << endl;

	for (int i = 0; i < size; i++) {
		cout << space << space + "[";

		for (int j = 0; j < size; j++) {
			if (j > 0)
				cout << ", ";
			
			cout << 1;
		}

		cout << "]";

		if (i != size - 1)
			cout << ",";

		cout << endl;
	}

	cout << space << "]";
}

int main(int argc, char* argv[]) {

	const string SPACE = "    ";

	if (argc < 2)
		return 1;

	int size = atoi(argv[1]);

	cout << "{" << endl;

	cout << SPACE << "\"first\": ";
	printMatrix(size, SPACE);
	cout << "," << endl;

	cout << SPACE << "\"second\": ";
	printMatrix(size, SPACE);
	cout << endl;

	cout << "}" << endl;

	return 0;
}
